import { Columns, ColumnType, Entity, Id } from "@ohos/dataorm";


@Entity('SEARCH_HISTORY')
export class SearchHistory {
  @Id({ isPrimaryKey: true, autoincrement: true }) //主键，自增
  @Columns({ columnName: 'ID', types: ColumnType.num })
  id: number

  @Columns({ columnName: 'MEMBER_ID', types: ColumnType.str })
  member_id: string = ''

  @Columns({ columnName: 'SEARCH_TERM', types: ColumnType.str })
  search_term: string = ''

  @Columns({ columnName: 'SEARCH_TIME', types: ColumnType.str })
  search_time: string = ''

  @Columns({ columnName: 'SEARCH_COUNT', types: ColumnType.num })
  search_count: number = 1

  constructor(id?: number) {
    this.id = id;
  }
}